import api from "../http/require"

export const loginIn = () => api({
    url: '/wx/home/index', //请求地址
    method: 'get', //请求方式
})
// wx/catalog/index
export const Search = () => api({
    url: '/wx/catalog/index', //请求地址
    method: 'get', //请求方式
})

export const Mess = (params) => api({
    url: '/wx/catalog/current', //请求地址
    method: 'get', //请求方式
    params
})

export const deta = (params) => api({
    url: '/wx/goods/category', //请求地址
    method: 'get', //请求方式
    params
})
export const Lsti = (params) => api({
    url: '/wx/goods/list', //请求地址
    method: 'get', //请求方式
   params
})
// /wx/goods/detail
export const detail = (params) => api({
    url: '/wx/goods/detail', //请求地址
    method: 'get', //请求方式
   params
})
// /wx/cart/add
export const post = () => api({
    url: '/wx/cart/add', //请求地址
    method: 'post', //请求方式
//    params
})
// /wx/auth/login

export const login = (data) => api({
    url: '/wx/auth/login', //请求地址
    method: 'post', //请求方式
    data
})

// wx/cart/add
export const adds = (data) => api({
    url: '/wx/cart/add', //请求地址
    method: 'post', //请求方式
    data
})

// /wx/cart/index
export const cart = () => api({
    url: '/wx/cart/index', //请求地址
    method: 'get', //请求方式
})
// /wx/collect/addordelete

export const collect = (data) => api({
    url: '/wx/collect/addordelete', //请求地址
    method: 'post', //请求方式
    data
})
// /wx/cart/goodscount

export const count = () => api({
    url: '/wx/cart/goodscount', //请求地址
    method: 'get', //请求方式
})
// /wx/cart/checked

export const checkedss = (data) => api({
    url: '/wx/cart/checked', //请求地址
    method: 'post', //请求方式
    data
})

// /wx/cart/delete 

export const delect = (data) => api({
    url: '/wx/cart/delete', //请求地址
    method: 'post', //请求方式
    data
})
// /wx/cart/checkout?cartId=0&addressId=0&couponId=0&userCouponId=0&grouponRulesId=0

export const checkout = (params) => api({
    url: '/wx/cart/checkout', //请求地址
    method: 'get', //请求方式
    params
})

// /wx/address/list

export const list = () => api({
    url: '/wx/address/list', //请求地址
    method: 'get', //请求方式
})
// /wx/address/save

export const saved = (data) => api({
    url: '/wx/address/save', //请求地址
    method: 'post', //请求方式
    data
})

// /wx/coupon/selectlist?cartId=0&grouponRulesId=0

export const selectlist = () => api({
    url: '/wx/coupon/selectlist?cartId=0&grouponRulesId=0', //请求地址
    method: 'get', //请求方式
})

// /wx/order/submit

export const submit = (data) => api({
    url: '/wx/order/submit', //请求地址
    method: 'post', //请求方式
    data
})

// /wx/order/detail

export const pandss = (params) => api({
    url: '/wx/order/detail', //请求地址
    method: 'get', //请求方式
    params
})

// /wx/user/index

export const indexmain = () => api({
    url: '/wx/user/index', //请求地址
    method: 'get', //请求方式
})
// /wx/user/info
// /wx/auth/info

export const infoss = () => api({
    url: '/wx/auth/info', //请求地址
    method: 'get', //请求方式
})

// /wx/order/list

export const listss = (params) => api({
    url: '/wx/order/list', //请求地址
    method: 'get', //请求方式
    params
})
// /wx/order/h5pay

export const h5payss = (data) => api({
    url: '/wx/order/h5pay', //请求地址
    method: 'post', //请求方式
    data
})
// /wx/order/delete

export const delpost = (data) => api({
    url: '/wx/order/delete', //请求地址
    method: 'post', //请求方式
    data
})
// /wx/coupon/mylist

export const mylistssss = (params) => api({
    url: '/wx/coupon/mylist', //请求地址
    method: 'get', //请求方式
    params
})